#pragma once

//Return values
//WORLD_RETURN_VALUES
#define SUCCEED 0
#define FAIL_MEMORY_ALLOCATION 1
#define FAIL_BAD_MEMORY_ACCESS 2
#define FAIL_LOSS_OF_MEMORY 3
#define FAIL_PARSER_UNKNOWN_COMMAND 4
#define FAIL_FILE_NOT_AVAILABLE 5
#define FAIL_MEMORY_COPY 6
#define UNKNOWN -1

//Only returns with the fail code if the function call did not succeed
#define Result(x)		\
{						\
	int r = x;			\
	if(r != SUCCEED)	\
		return r;		\
}

//Distances
#define KILOMETER 20
#define BLOCK_TEXTURE_SIZE 13
#define f_BLOCK_TEX_SIZE BLOCK_TEXTURE_SIZE.0f
#define BLOCK_HEALTH 1

//#define INFINITE_JUMP

#define MAX_LIST_SIZE 512//2048

//#define INFINITE_JUMP

#define DRAWLIST_RADIUS 15

#define PROJECTILE_COLLIDE_RADIUS 14

#define BLOCK_COLLIDE_RADIUS 3

#define MAX_PROJECTILES 64
#define CHECK_LOAD 15 * BLOCK_TEXTURE_SIZE
#define LOAD_DISTANCE 20 * BLOCK_TEXTURE_SIZE

#include "Byte Definitions.h"
#include "Block Definitions.h"
#include "Chunk Definitions.h"

#define MAX_PLAYERS 4
#define LOCAL_PLAYER 0